package com.webproject.dao.impl.houseManager;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.webproject.core.Page;
import com.webproject.dao.houseManager.RoomManagerDao;
import com.webproject.entity.houseManager.AcceptRoomInfo;
import com.webproject.entity.houseManager.Room;
import com.webproject.entity.houseManager.RoomInfo;
import com.webproject.entity.houseManager.RoomRepairInfo;

public class RoomManagerDaoImpl extends SqlMapClientDaoSupport implements RoomManagerDao {

	@Override
	public List<Room> queryRoom(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("roomManager.queryRoom", page);
	}

	@Override
	public void saveRoom(Room room) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("roomManager.saveRoom", room);
	}

	@Override
	public void updateRoom(Room room) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("roomManager.updateRoom", room);
	}

	@Override
	public void deleteRoom(Room room) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().delete("roomManager.deleteRoom", room);
	}

	@Override
	public int queryRoomCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("roomManager.queryRoomCount", page);
	}

	@Override
	public List<RoomInfo> queryRoomInfo() {
		// TODO Auto-generated method stub
		return  getSqlMapClientTemplate().queryForList("roomManager.queryRoomInfoAll");
	}

	@Override
	public List<RoomInfo> queryRoomInfo(Page page) {
		// TODO Auto-generated constructor stub
		return getSqlMapClientTemplate().queryForList("roomManager.queryRoomInfo", page);
	}

	@Override
	public int queryRoomInfoCount(Page page) {
		// TODO Auto-generated constructor stub
		return (Integer) getSqlMapClientTemplate().queryForObject("roomManager.queryRoomInfoCount", page);
	}

	@Override
	public void saveRoomInfo(RoomInfo roomInfo) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().insert("roomManager.saveRoomInfo", roomInfo);
	}

	@Override
	public void updateRoomInfo(RoomInfo roomInfo) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().update("roomManager.updateRoomInfo", roomInfo);
	}

	@Override
	public void deleteRoomInfo(RoomInfo roomInfo) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().delete("roomManager.deleteRoomInfo", roomInfo);
	}

	@Override
	public List<RoomRepairInfo> queryRoomRepairInfo(Page page) {
		// TODO Auto-generated constructor stub
		return getSqlMapClientTemplate().queryForList("roomManager.queryRoomRepairInfo", page);
	}

	@Override
	public int queryRoomRepairInfoCount(Page page) {
		// TODO Auto-generated constructor stub
		return (Integer) getSqlMapClientTemplate().queryForObject("roomManager.queryRoomRepairInfoCount", page);
	}

	@Override
	public void saveRoomRepairInfo(RoomRepairInfo repairInfo) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().insert("roomManager.saveRoomRepairInfo",repairInfo);
	}

	@Override
	public void updateRoomRepairInfo(RoomRepairInfo repairInfo) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().update("roomManager.updateRoomRepairInfo", repairInfo);
	}

	@Override
	public void deleteRoomRepairInfo(RoomRepairInfo repairInfo) {
		// TODO Auto-generated constructor stub
		getSqlMapClientTemplate().delete("roomManager.deleteRoomRepairInfo", repairInfo);
	}

	@Override
	public List<AcceptRoomInfo> queryAcceptRoomInfo(Page page) {
		// TODO Auto-generated constructor stub
		return null;
	}

	@Override
	public int queryAcceptRoomInfoCount(Page page) {
		// TODO Auto-generated constructor stub
		return 0;
	}

	@Override
	public void saveAcceptRoomInfo(AcceptRoomInfo acceptRoomInfo) {
		// TODO Auto-generated constructor stub
		
	}

	@Override
	public void updateAcceptRoomInfo(AcceptRoomInfo acceptRoomInfo) {
		// TODO Auto-generated constructor stub
		
	}

}
